package com.haiyou.common.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 响应状态码与提示语
 */
@Getter
@AllArgsConstructor
public enum MessageCode {
    /**
     * 500通用请求异常
     * 200返回请求正常
     */
    ERROR(500, "服务器繁忙"),
    LOGIN_PASSWORD_ERROR(1113, "用户密码错误"),
    PASSWORD_NONULL(1114, "用户密码不能为空"),
    PASSWORD_NOEQUAL(1115, "两次密码不一致"),
    WRONG_PHONE_ERRO(1139, "手机号码不能为空"),
    FORM_ERROR(1140, "表单验证异常"),
    PHONE_CODE_EMPTY(1142, "手机验证码不能为空"),
    VERIFICATION_CODE_ERROR(1143, "手机验证码错误"),
    EXIST_DATA(2000, "数据已存在"),
    NO_AUTH(401, "没有权限"),
    IS_NULL(402, "数据为空"),
    NO_LOGIN(403, "未登录"),
    NOT_FOUNT(404, "无法找到资源"),
    VALID_PARAMS_ERROR(444, "检验参数异常"),
    TOKEN_EXCEPTION(4001, "token错误或者token过期"),
    SUCCESS(200, "成功");
    private final int code;
    private final String message;
}
